-
Notifications
You must be signed in to change notification settings - Fork 147
Compare/Replace selection or editor with clipboard #1862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @iloveeclipse |
|
I'm biased here, since this feature is provided by AnyEdit Tools plugin since years: |
but having it built directly into Eclipse makes it easier and more consistent for users—no need to install or manage extra plugins just to do something that feels like it should be built-in |
|
Why not let this feature be in AnyEdit plugin? It's tested, has more features etc. |
Having it in standard is desired for such a useful and core feature. Also I don't think every user has AnyEdit installed, for example I think I never did install it. |
|
I would expect then that this contribution would add same functionality AnyEdit provides for clipboard, means also context menus for files in Package Explorer, not just "Compare with..." but also "Replace with.." etc. |
bca7d6d to
0a132e9
Compare
This is fixed now |
Sure. i'll add Replace with clipboard feature too 👍 |
Thanks. Next issue I see, is that it seems that I can also do this compare once. I tested my scenario above. After that I copied some source code from the compare editor and did the compare on another file. Nothing happens. |
0a132e9 to
0096bed
Compare
This is fixed now + Added replace with clipboard functionality + Compare/Replace from Project/Package exp context menu Replace_1.mp4Replace_2.mp4 |
|
Calling compare on some files switching the project results in the following exception for me: java.lang.NullPointerException: Cannot invoke "String.getBytes(java.nio.charset.Charset)" because "this.content" is null |
Strange. I'll provide null check for it |
51a12e2 to
b9af0a3
Compare
Reproduced and handled this now |
b9af0a3 to
5746f48
Compare
5746f48 to
b3f124c
Compare
|
Testing this again. I don't think compare is correct for this example:
@SougandhS please have a look |
b3f124c to
73d7e06
Compare
Thanks for this case. Its fixed now bugfix.mp4 |
73d7e06 to
8e6cd5f
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
3f5929e to
e4a67e0
Compare
|
Hi @vogella , could you please review this when you have time? |
e4a67e0 to
3ca13a3
Compare
Allows users to compare or replace either the selected text or the entire editor content against the clipboard content
3ca13a3 to
e8d0937
Compare
|
LGTM, thanks @SougandhS |
|
@SougandhS can you please add this to the N&N for the next release? I think this would be the place: https://github.com/eclipse-platform/www.eclipse.org-eclipse/blob/master/news/4.37/platform.md |
|
Thank you @vogella & @iloveeclipse for the review
Sure 👍 |
|
There is a problem (at least for me it is one) with the compare editor, which will be visible if you compare what AnyEdit provides with the current implementation. Please make sure the compare allows to modify the text file, currently it only allows read-only mode. |
I will provide a patch for that 👍 |




This feature will allow users to compare either the selected text or the entire editor content against the current clipboard contents similar to other IDEs.

If users want to just compare just a selection in an editor, select the section and choose Compare with-> Clipboard
(I had changes copied..)
Selection.mp4
Selection2.mp4
If User want to compare entire Editor, either select all or select None and choose _Compare with-> Clipboard_
Entire.mp4